<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>

    <style>
        .demo1{
            background-color: aqua;
            height: 100px;
        }
        #haha{
            background-color: rgb(0, 255, 76);
            

            
           
        }
    </style>
</head>
<body>
    
    <div id="root">
        <H1>欢迎，{{name}}</H1>
        <input type="text" @keyup.enter="showinfo1">
        <!-- <button v-on:click="showinfo1">点我提示信息1</button>
        <button @click="showinfo2(66,$event)">点我提示信息2</button> -->
        <!-- <a href="https:www.baidu.com" @click.prevent="show">链接</a>
        <div class="demo1" @click="showinfo">
            <button id="haha"   @click.stop="showinfo">点我提示信息</button>
        </div> -->

    </div>
</body>
<script>
    new Vue({
        el:"#root",
        data:{
            name:"at"
        },
        methods:{
            show(event){
                alert("hello");
                // console.log(event.target);
                // alert(event.target.innerHTML);
            },
            showinfo1(event){
                // alert("button");
                console.log(event.target);
                // console.log(event.target);
                // alert(event.target.innerHTML);
            },
          
        }
    })
</script>
</html>